package com.liyi.letter.system.controller;

import com.liyi.letter.common.result.Result;
import com.liyi.letter.system.entity.Employee;
import com.liyi.letter.system.service.EmployeeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @program: letter_parent
 * @description
 * @author: tianwen
 * @create: 2023-06-06 10:56
 **/
@RestController
@RequestMapping("/test/system")
@CrossOrigin
public class TestController {
    @Autowired
    private EmployeeService employeeService;
    @GetMapping("/select")
    public Result select(Long employeeId){
        Employee employee = employeeService.getById(employeeId);
        return Result.ok(employee);
    }
}
